<?php

include_once 'core/Node.php';
include_once 'core/IterativeInterpreter.php';

class PageInterpreter extends IterativeInterpreter{
	
	public function interpret(Node $node){
		$name = $node->getAttribute('#');
		$theme = $node->getAttribute('@0');
		
		$ret = '<div data-role="page" id="'.$node->getAttribute('id').'"';
		
		if($theme != ''){
			$ret .= ' data-theme="'.$theme.'" ';
		}
		$ret .='>';
		
		$ret .= parent::interpret($node);
		
		$ret .='</div>';
		
		return $ret;
	}
}